﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Pigmalion.BusinessEntities;
using Pigmalion.BusinessLogic;

namespace Pigmalion.Presenter.ProductoPresenter
{
    public partial class ProductoMttoPresenter
    {
        private readonly IProductoMttoView _view;
        private IProductoBL factoryPoductoBL;
        private ICategoriaBL factoryCategoriaBL;

        public ProductoMttoPresenter(IProductoMttoView view)
        {
            _view = view;
            factoryPoductoBL = new ProductoBL();
            factoryCategoriaBL = new CategoriaBL();
        }

        public void CargarCategorias()
        {
            _view.Categorias = factoryCategoriaBL.GetAllFromCategoria(); 
        }

        public void RegistarProducto(Producto producto)
        {
            factoryPoductoBL.RegistarProducto(producto);
        }
            
        
    }
}
